import React from 'react'
import ListTitle from '../../../components/SystemPrivileges/ListTitle'
import RoleList from '../../../components/SystemPrivileges/RoleList'
import { useSelector } from 'react-redux'
import { Space, Switch } from 'antd';
import { Link } from 'react-router-dom';
import Bread from '../../../components/Bread';

// 表头
const columns = [{
    title: '备份文件名',
    dataIndex: 'file_name',
},
{
    title: '版本号',
    dataIndex: 'version_num',
},
{
    title: '大小(字节)',
    dataIndex: 'byte_size',
},
{
    title: '备份时间',
    dataIndex: 'file_time',
},
{
    title: '操作',
    key: 'action',
    render: (text, record) => (
        <Space>
            <a>恢复</a>
            <a>删除</a>
        </Space>
    )
}]

export default function DataBaseManage() {
    const databaseList = useSelector(state => state.systemRoleStore.databaseList)
    return (
        <div className='database-manage'>
            <Bread bread_title1="系统权限" bread_title2="数据库管理" />
            <ListTitle isStart={true} />
            <RoleList columns={columns} data={databaseList || []} />
        </div>
    )
}
